﻿<div class="jumbotron">
         <div class="panel panel-default">
             <div class="panel-heading">
                 <h3 class="panel-title">
                     <p>欢迎 @if (ViewBag.Identity != 0)
                           {
                               <a> @ViewBag.Identity 个林区的管理员 </a>
                           } @ViewBag.username</p>
                 </h3>
             </div>
             @using (Html.BeginForm("insertNewAssets", "tp"))
                          {
                              <div style="text-align: center">
                                  <input class="btn btn-primary" type="submit" value="插入信息"/>
                              </div>
                          }
             <div class="panel-body">
                 <table class="table table-striped" style="table-layout: fixed">
                     <thead>
                     <tr>
                         <th>园区</th>
                         <th>树种</th>
                     </tr>
                     </thead>
                     <tbody>
                     @foreach (var item in (List<tp>)ViewBag.msg)
                     {
                         <form action="~/tp/delete" method="post">
                             <tr>
                                 <td>
                                     <input name="park" value="@item.park" readonly="readonly" class = "form-control"/>
                                 </td>
                                 <td>
                                     <input name="tree" value="@item.tree" readonly="readonly" class = "form-control"/>
                                 </td>
                                 <td>
                                     <input type="submit" value="删除"/>
                                 </td>
                             </tr>
                         </form>
                     }
                     @if (ViewBag.Insert != 0)
                     {
                         <form action="~/tp/addNew" method="post">
                             <tr>
                                 <td>
                                     <input name="park" value="" class = "form-control"/>
                                 </td>
                                 <td>
                                     <input name="tree" value="" class = "form-control"/>
                                 </td>
                                 <td>
                                     <div class="btn-group btn-group-sm">
                                         <input class="btn btn-primary col-sm-offset-1" type="submit" value="插入"/>
                                     </div>
                                 </td>
                             </tr>
                         </form>
                     }
                     </tbody>
                 </table>
             </div>
         </div>
     </div>